<form class="form-horizontal" id="form-add-news">
    <div class="form-group">
        <label class="control-label col-xs-2">
            标题
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" value="{$info.title|default=''}" required class="form-control" name="title" autocomplete="off" placeholder="标题">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            详情
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            {include file="public/ueditor" editor-name="content" /}
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-offset-2 col-xs-3">
            <button type="submit" class="btn btn-success btn-block">确认</button>
        </div>
    </div>
</form>

<script src="__PUBLIC__/vendors/jquery.validation/jquery.validate.min.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/additional-methods.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/messages_zh.min.js"></script>
<script src="__PUBLIC__/vendors/select2/js/select2.min.js"></script>
<script type="application/javascript">
    $(function () {
        $("form").validate({
            debug: false,
            submitHandler: function () {
                ajaxSubmit('form-add-news', true);
            }
        });
    })
</script>
